﻿Option Strict On
Option Explicit On

Partial Class private_secure_members_manage_MyCredit
    Inherits System.Web.UI.Page

    Dim u As MembershipUser
    Dim personId As Int32
    Dim delid As Integer
    Dim entityid As Integer

    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        u = Membership.GetUser(HttpContext.Current.User.Identity.Name)

        Dim getpersonid As New GetPersonIdFromUserId()

        personId = getpersonid.GetPersonId(CType(u.ProviderUserKey, Guid))
        Dim entityidTA As New LogginsLogDSTableAdapters.usp_GetEntityListFull_ByPersonIdTableAdapter()
        Dim entityidDT As LogginsLogDS.usp_GetEntityListFull_ByPersonIdDataTable
        entityidDT = entityidTA.GetData(personId)

        Try
            GridView1.DataBind()
        Catch ex As Exception

        End Try

    End Sub
    Protected Sub SqlEntity_ds_Selecting(sender As Object, e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlEntity_ds.Selecting
        e.Command.Parameters("@PersonId").Value = CType(personId, Integer)
    End Sub

    Protected Sub btnBuyCredit_Click(sender As Object, e As System.EventArgs) Handles btnBuyCredit.Click
        'Because the user is paying money make sure that no one else is spending money on their behalf
        'So ask them for their credentials again even though they are logged in

        'Now pop up a box allowing the user to purchase credits - 10, 20, 50, 100, 200, 500, 1000

    End Sub
End Class
